CMAKE_MINIMUM_REQUIRED(VERSION 3.10)

PROJECT(demo3)

#ADD_SUBDIRECTORY(./mylib)           #add sumdir
ADD_SUBDIRECTORY(./mylib)

AUX_SOURCE_DIRECTORY(./ DIR_SRCS)

ADD_EXECUTABLE(demo3  ${DIR_SRCS})

#TARGET_LINK_LIBRARIES(demo3 Mylib)#link
TARGET_LINK_LIBRARIES(demo3 Mylib)
